package cn.webrx;

import java.util.TreeSet;

public class TreeSet2 {
    public static void main(String[] args) {
        //String
        TreeSet<User> ts = new TreeSet<>((a,b)->b.getId()-a.getId());
        ts.add(new User(1,"李四1",30));
        ts.add(new User(2,"李四2",10));
        ts.add(new User(3,"李四3",50));
        ts.add(new User(4,"李四4",60));
        ts.add(new User(5,"李四5",10));
        System.out.println(ts);
    }
}
